<template>
  <div class="main-company-index" @click.capture="closeDrown"> 
  	<!-- <so-header :seller="options.name"></so-header> -->
		<headerSearch :title="options.name" :share="true"  @done="gotobtn"></headerSearch>
		<!-- 下拉出现功能 -->
		<div class="dropDownpanel" v-if="drownshareShow">
				<span class="dropdown_triangle"></span>
				<a href="javascript:void(0)" @click="shareClick" v-show="shar_show" ><i class="iconfont icon-fenxiang4" ></i>分享</a>
				<a href="javascript:void(0)" @click="addCollect" v-show="coll_show" ><i class="iconfont icon-shoucang2" ></i>收藏</a>
				<a href="javascript:void(0)" @click="removeCollect" v-show="recoll_show" ><i class="iconfont icon-shoucang2" ></i>取消收藏</a>
				<a href="javascript:void(0)" @click="editCompany" v-show="edit_show"><i class="iconfont icon-bianji1"></i>编辑</a>
				<a href="javascript:void(0)" @click="teamCompanyData" v-show="set_show"><i class="iconfont icon-shezhi1"></i>设置</a>
				<a href="javascript:void(0)" @click="joinCompany" v-show="join_show"><i class="iconfont icon-jiaru"></i>申请加入</a>
    </div>
    <div class="suspension_content">
      <!-- 头部浮层 -->
      <div class="main-suspension"> 
        <div class="suspension-top" style="height: 2.64rem;line-height: 2.2rem;">
					<img :src="options.log_img" alt="" v-if="options.log_img">
					<img src="../common/images/youquan.png" alt="" v-else>
					<!-- <p class="main_index_desc">{{options.name}}</p> -->
				</div>
        <div class="suspension-info" style="height: 1.8rem; top: 1.86rem;">
          <!-- 卡片头部-下 -->
            <!-- 圆形头像 -->
            <div class="coterie" style="padding: 0.2rem;">
						
                <ul>
                  <li @click="jumpCi()">
                    <a href="javascript:void(0)">
                      <img src="../common/images/icon_01.png" alt="" style="width: 0.66rem;">
                      <span style="width: 0.96rem; color: #666;">ta的圈子</span>
                    </a>
                  </li>
									<li @click="jumpCp()">
                    <a href="javascript:void(0)">
                      <img src="../common/images/icon_02.png" alt="" style="width: 0.66rem;">
                      <span style="width: 0.96rem; color: #666;">企业官网</span>
                    </a>
                  </li>
									<li @click="jumpMe()">
                    <a href="javascript:void(0)">
                      <img src="../common/images/icon_03.png" alt="" style="width: 0.66rem;">
                      <span style="width: 0.96rem; color: #666;">对话交流</span>
                    </a>
                  </li>
									<li @click="jumpPro()">
                    <a href="javascript:void(0)">
                      <img src="../common/images/icon_04.png" alt="" style="width: 0.66rem;">
                      <span style="width: 0.96rem; color: #666;">产品列表</span>
                    </a>
                  </li>
									<li @click="jumpAct()">
                    <a href="javascript:void(0)">
                      <img src="../common/images/icon_05.png" alt="" style="width: 0.66rem;">
                      <span style="width: 0.96rem; color: #666;">企业新闻</span>
                    </a>
                  </li>
                </ul>
            </div>  
        </div>
      </div>
		  <!--通知内容区=-->
			<div class="main-notice" style="margin-top: 0.8rem; position: relative;" v-show="notice_show">
				<span>通知 | </span>
				<marquee>{{options.c_content}}</marquee>
				<div class="notice_editor" v-show="notice_editor">
					<i class="iconfont icon-shanjian" style="font-size: 0.26rem;" @click="deleteCom(8)"></i>
					<small>
						<!-- <a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="deleteCom(1)"><i class="iconfont icon-shanchu" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>删除</a> -->
						<a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="editorNotice()"><i class="iconfont icon-bianji1 icon_editor" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>{{editor}}</a>
					</small>
				</div>
			</div>
			<!--公司简介=-->
	    <div :class="classA" v-show="com_show">
					<div class="title_text_more" >
						<h3>公司简介</h3>
						<div style="line-height: 0.8rem;" v-show="com_set_show">
							<a href="javascript:void(0)" style="font-size: 0.28rem !important;display:none;" @click="deleteCom(1)"><i class="iconfont icon-shanchu" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>删除</a>
							<a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="editordesc(stau)"><i class="iconfont icon-bianji1 icon_editor" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>{{editortext}}</a>
						</div>
					</div>  
					<div class="main-company-index-description">
						<div class="option_description">
							<img :src="options.log_img" alt="" v-if="options.log_img">
							<img src="../common/images/youquan.png" alt="" v-else>
						
							<div style="text-align: left;">
								<h3>{{options.name}}</h3>
								<!-- <p>11~50人  |  1000万人民币   |  www.iisp.com</p> -->
								<p>{{options.c_website}}</p>
							</div>
						</div>
						<div class="option_tagNames" style="padding-left: 0.4rem;" v-if="tag_show">
							
              <span v-for="(biao, b) in tags" :key="b" style="position: relative; border: 0;height:0.46rem !important; line-height: 0.46rem;padding: 0 0.1rem !important;">
								<i class="iconfont icon-shanjian" style="font-size: 0.26rem;left: -0.14rem;top: -0.14rem;" @click="delClick(biao.id)"></i>
								#<em ref="myboxs" contenteditable="true" :id="biao.id">{{biao.label_name}}</em> 
							</span>
							<span class="insertag" @click="tagShow" v-if="tags.length < 1" style="margin-left: -0.2rem;">+</span>
							<span class="insertag" @click="tagShow" v-else>+</span>
              <!-- <span>暂无设置标签</span> -->
            </div>
						<div class="option_tagNames" v-else>
							
              <span v-for="(biao, b) in tags" :key="b" style="position: relative; border: 0;height:0.46rem !important; line-height: 0.46rem;padding: 0 0.1rem !important;">
								<!-- <i class="iconfont icon-shanjian" style="font-size: 0.26rem;left: -0.14rem;top: -0.14rem;"></i> -->
								#<em ref="myboxs" contenteditable="false">{{biao.label_name}}</em>
							</span>
							<!-- <span class="insertag" @click="tagShow">+</span> -->
              <!-- <span>暂无设置标签</span> -->
            </div>
            <p v-if="descShow" class="company_description_descShow" contenteditable="true" ref="mybox">{{ options.description?options.description:'暂无简介' }}</p>
            <p v-else  ref="mybox" contenteditable="false">{{ options.description?options.description:'暂无简介' }}</p>
					</div>
	    </div>
			<!-- 隐藏start -->
			<!-- <div class="about_hidden">
				<div class="main-company-index-corpor"  v-show="fa_show">
						<div style="line-height: 0.3rem; margin-top: -0.4rem; text-align: right; color: #999;margin-right: -0.2rem;" v-show="fa_set_show">
							<a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="deleteCom(2)"><i class="iconfont icon-shanchu" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>删除</a>
							<a href="javascript:void(0)" style="font-size: 0.28rem !important;"><i class="iconfont icon-bianji1 icon_editor" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>编辑</a>
						</div>
						<div v-for="(corpor,co) in corporation" :key="co" class="corpor-list">
							<label for="">{{corpor.c_Name}}</label>
							<strong>{{corpor.c_Msg}}</strong>
						</div>
				</div> -->
				<!-- 基本信息 -->
				<!-- <div class="main-essential_info" style="margin-bottom: 0.2rem;"  v-show="base_show">
						<div class="title_text_more" >
							<h3>基本信息</h3>
							<div style="line-height: 0.8rem;" v-show="base_set_show">
								<a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="deleteCom(3)"><i class="iconfont icon-shanchu" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>删除</a>
								<a href="javascript:void(0)" style="font-size: 0.28rem !important;"><i class="iconfont icon-bianji1 icon_editor" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>编辑</a>
							</div>
						</div>   -->
						<!-- 大方形头像 -->
						<!-- <div class="big_square">
							<ul class="soc">
								<li>
										<img src="../common/images/jb2.png" alt="">
										<span>工商信息</span>
								</li>
								<li>
										<img src="../common/images/jb3.png" alt="">
										<span>变更记录</span>
								</li>
								<li>
										<img src="../common/images/jb1.png" alt="">
										<span>企业年报</span>
								</li>
								<li>
										<img src="../common/images/jb2.png" alt="">
										<span>对外投资</span>
								</li>
							</ul>
						</div>
				</div>
			</div> -->
					<!-- <a href="javascript:;" v-show="s_btn_more" class="btn_more" @click="btn_more">更多&nbsp;＞</a> -->
			<!-- 隐藏end -->
			<!-- 企业热销 -->
			<div class="main-company-index_product"  v-show="hot_show">
					<div class="title_text_more">
						<h3>企业热销<em>每日热销排行</em></h3>
						<div style="line-height: 0.8rem;" v-show="hot_set_show">
							<a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="deleteCom(4)"><i class="iconfont icon-shanchu" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>删除</a>
							<a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="activeditorClick('product_hot')"><i class="iconfont icon-bianji1 icon_editor" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>编辑</a>
						</div>
						<a href="javascript:void(0)" @click="clickMore('hot')" v-show="more_show">
              更多<i class="iconfont icon-xiangyou"></i>
            </a>
					</div>  
					<!-- 三栏商品 -->
					<div class="host_item">
						<!-- <div style="font-size: 0.3rem; color: rgb(102, 102, 102);line-height: 0.5rem;height: 0.5rem;" v-if="hostlist == ''">
                --&nbsp;暂无数据&nbsp;--
            </div> -->
						<div class="emptyProduct" v-if="hostlist == ''">
								<img src="../common/images/empty.png" alt="">
								<p>小主人，您的热销产品还没添加呢~请赶紧添加吧!</p>
						</div>
						<ul v-else>
							<li v-for="(host, h) in hostlist.slice(0, 3)" :key="h" @click="jumpProduct(host.IDProduct)">
								<a href="javascript:void(0)">
									<small>
										<img src="../common/images/cm_03.jpg" v-if="host.smallImg == null">
										<img :src="host.smallImg" alt="" v-else>
									</small>
									
									<span>{{host.chrName}}</span>
									<span>已售<strong>{{host.NumS}}</strong>件</span>
								</a>
							</li>
						</ul>
					</div> 			
			</div>  
			<!-- 限时抢购 -->
			<!-- <div class="industry_circle rush_to_purchase main-company-index_product" style="padding: 0 0.2rem;margin-top: -0.2rem !important;"  v-show="qi_show">
				<div class="purchase_title title_text_more">
					<h3><span>限时抢购</span><em>80</em>:<em>21</em>:<em>47</em></h3>
					<div style="line-height: 0.8rem;" v-show="qi_set_show">
						<a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="deleteCom(5)"><i class="iconfont icon-shanchu" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>删除</a>
						<a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="activeditorClick('product_panic')"><i class="iconfont icon-bianji1 icon_editor" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>编辑</a>
					</div>
					<a href="javascript:void(0)" @click="clickMore('panic')" v-show="more_show">
              更多<i class="iconfont icon-xiangyou"></i></a>
				</div>
				<div class="purchase">
					<div class="emptyProduct" v-if="purlist == ''">
							<img src="../common/images/empty.png" alt="">
							<p>小主人，您的产品还没添加呢~请赶紧添加吧!</p>
					</div>
					<ul class="purchase_list clear" v-else>
						<li v-for="(pur, p) in purlist" :key="p" @click="jumpProduct(pur.IDProduct)">
							<a href="javascript:void(0)">
								<span class="purchase_img">
									<img src="../common/images/cindex_37.jpg" v-if="pur.smallImg == null">
									<img :src="path + pur.smallImg" v-else>
								</span>
								<span>{{pur.chrName}}</span>
								<span class="pur_scare">
									<em>抢购价</em>
									<strong><sub>￥</sub>{{pur.Price}}</strong>
									<small>已抢购{{pur.NumS}}件</small>
								</span>
							</a>
						</li>
					</ul>
				</div>
			</div> -->
			<!-- 活动列表 -->
			<!-- <div class="industry_circle active_list main-company-index_product" style="padding: 0 0.2rem;" v-show="hou_show">
				<div class="title_text_more">
					<h3>商家活动</h3>
					<div style="line-height: 0.8rem;" v-show="hou_set_show">
						<a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="deleteCom(6)"><i class="iconfont icon-shanchu" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>删除</a>
						<a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="activeditorClick('activity')"><i class="iconfont icon-bianji1 icon_editor" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>编辑</a>
					</div>
					<a href="javascript:void(0)" @click="clickMore('act')" v-show="more_show">
              更多<i class="iconfont icon-xiangyou"></i></a>
				</div>
				<div class="active_item">
					<!-- <div style="font-size: 0.3rem; color: rgb(102, 102, 102);     line-height: 0.5rem;height: 0.5rem;" v-if="actives == ''">
              --&nbsp;暂无数据&nbsp;--
          </div> -->
					<!--<div class="emptyProduct" v-if="actives == ''">
							<img src="../common/images/empty.png" alt="">
							<p>小主人，您的活动还没添加呢~请赶紧添加吧!</p>
					</div>
					<ul v-else>
						<li v-for="(activeitem, act) in actives" :key="act" @click="activitydetailClick(activeitem.id)">
							<a href="javascript:void(0)" class="clear">
								<span class="active_list_img">
									<img src="../common/images/cindex_19.jpg" v-if="activeitem.img == null">
									<img :src="activeitem.img" alt="" v-else>
								</span>
								<p class="active_text"><em class="cur">热门</em>{{activeitem.title}}</p>
								<p class="active_text">开始时间：{{activeitem.begin_time}}</p>
								<p class="active_text"><span><sub>￥</sub><strong>{{activeitem.price}}</strong>起</span></p>
								<!-- <span>{{activeitem.apply_num}}</span> -->
							<!--</a>
						</li>
					</ul>
				</div>
			</div> -->
			<!-- 资讯列表 -->
			<div class="industry_circle more_info main-company-index_product"  style="padding: 0 0.2rem;" v-show="new_show">
				<div class="title_text_more">
					<h3>企业新闻</h3>
					<div style="line-height: 0.8rem;"  v-show="new_set_show">
						<a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="deleteCom(7)"><i class="iconfont icon-shanchu" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>删除</a>
						<a href="javascript:void(0)" style="font-size: 0.28rem !important;" @click="activeditorClick('news')"><i class="iconfont icon-bianji1 icon_editor" style="font-size: 0.26rem;margin-right: 0.1rem;"></i>编辑</a>
					</div>
				<a href="javascript:void(0)" @click="clickMore('news')" v-show="more_show">
              更多<i class="iconfont icon-xiangyou"></i></a>
				</div>
				
				<div class="info_list">
					<!-- <div style="font-size: 0.3rem; color: rgb(102, 102, 102);     line-height: 0.5rem;height: 0.5rem;" v-if="infolist == ''">
                --&nbsp;暂无数据&nbsp;--
          </div> -->
					<div class="emptyProduct" v-if="infolist == ''">
							<img src="../common/images/empty.png" alt="">
							<p>小主人，您的新闻还没添加呢~请赶紧添加吧!</p>
					</div>
					<ul v-else v-for="(initem, t) in infolist" :key="t" >
						<li @click="newsdetailClick(initem.IDNews)" v-if="initem.count ==1">
							<a href="javascript:void(0)" class="clear">
								<div class="info_list_item_left">
									<img src="../common/images/cindex_41.jpg"  v-if="initem.img == null">
									<img :src="initem.img" alt="" v-else> 
								</div>
								<p>{{initem.Title}}</p>
								<p class="info_time"><span>{{initem.summary}}</span><span>{{initem.dtCreate}}</span></p>
							</a>
						</li>
						<li  @click="newsdetailClick(initem.IDNews)" v-else>
							<div class="info" style="padding: 0 0.2rem !important;">
								<p>{{initem.Title}}</p>
								<ul>
									<li v-for="(info, fo) in initem.img" :key="fo">
										<a href="javascript:void(0)">
											<img src="../common/images/cindex_41.jpg"  v-if="info == null">
											<img :src="info" alt="" v-else>
										
										</a>
									</li>
								</ul>
								<p class="info_time"><span>{{initem.summary}}</span><span>{{initem.dtCreate}}</span></p>
							</div> 
						</li>
					</ul>
				</div>
			</div>

			<!-- <p @click="activeditorClick('module')" v-show="add_module">添加模块</p> -->
			<div class="mycard_insert" @click="activeditorClick('module')" v-show="add_module">
					<i class="iconfont icon-icon02"></i>
					<span>添加模块</span>
			</div>
    </div>
		<!-- 编辑动态 -->
		<div class="Editorial_dynamics" v-show="activeShow">
			<div class="intop"></div>
			<div class="editorial_list">
				  <div class="editorial_title">
							<button @click="cancel">取消</button>
							<h3>{{Title}}({{xNum}}/{{cNum}})</h3>
							<button @click="finish(check)">完成</button>
					</div>
					<div class="editorial_content" style="height: 6.1rem;overflow: scroll;">
						<div class="editorial_excl" v-for="(list, act) in edit_list" :key="act">
							<div class="editorial_item clear" style="position: relative;">
									<div class="fl " v-show="ed_show">
										<img :src="list.img" alt="">
									</div>
									<div class="editorial_item_title fl" :value="list.id">
										 <p>{{list.name}}</p>
										 <p class="clear" v-show="ed_show">
											 	<span class="fl" v-show="Num_show">已售<em>{{list.Num}}</em>件</span>
												<span class="fr">{{list.date_time}}</span>
										 </p>
									</div>
									<div class="editorial_change fr">
										<!-- <Checkbox @checkClick="choose()"></Checkbox> -->
										 <Checkbox :model.sync="list.checked" @update:model="singChange"  :ref="'edit_id' + list.id" :disabled="list==='1'"></Checkbox>
									</div>
							</div>
						</div>
					</div>
					
			</div>
		</div>
		<!-- 编辑通知 -->
		<div class="Editorial_dynamics" v-show="activeNoticeShow">
			<div class="intop"></div>
			<div class="editorial_list" style="height:2rem;top:55%;">
				  <div class="editorial_title">
							<button @click="cancelNotice">取消</button>
							<h3>编辑通知</h3>
							<button @click="finishNotice()">完成</button>
					</div>
					<div class="editorial_content" >
						<input type="text" value="" placeholder="请输入企业通知" v-model="notice_content" style="width: 96%;height: 0.6rem;" />
					</div>
					
			</div>
		</div>
		<!-- 分享按钮 -->
		<!-- <div class="view_card_share" :style="'right: ' + position ">
			<div class="share_hide_btn" @click="showFunc"><i class="iconfont icon-fanhui"></i></div>
			<div class="share_hide_collection">
				<div class="hide_collection" @click="addCollect" v-if="!isCollect"><i class="iconfont icon-shoucang"></i><span>收藏</span></div>
				<div class="hide_collection" @click="removeCollect" v-else><i class="iconfont icon-shoucang"></i><span>已收藏</span></div>
				<div class="hide_collection" @click="gotobtn"><i class="iconfont icon-fenxiang2"></i><span>转发</span></div>
			</div>
		</div> -->
		<!-- 分享引导 -->
      <div class="Share_guidance" @click="closeShare"  v-if="shareshow"></div>
      <shareTopage v-if="shareToShow" @wxdone="closeShare" @wxmessage="MessageShareData" @wxline="TimelineShareData"></shareTopage>
			<share v-if="isShow" @success="shareSuccess" @closeShare="closeShare" :title="options.name + '的企业主页'" :desc="options.description?options.description:'暂无简介'" :link="shareLink" :Sharing="Sharing" :imgUrl="shareLink + companyImgUrl"></share>
		<!-- 收藏转发 -->
		<!-- <div>
			
			<button>点击</button>
			<div>
				1111
			</div>
		</div> -->
     <so-footer></so-footer>

		 <div class="dialog__wrap" v-show="stateShow">
            <transition name="background-fade" @after-leave="afterLeave">
              <div class="dialog__background" v-if="show"></div>
          </transition>
          <transition name="fade-move">
              <div class="dialog">
                  <div class="dialog__head">
                      <span class="dialog__head__title">
                          输入标签名称
                      </span>
                      <i class="iconfont icon-cuo dialog__head__btn" @click="close"></i>
                  </div>
                  <div class="dialog__body">
                      <span>
                          <input type="text" :placeholder="placeholder" class="message_level" v-model="conttent">
                      </span>
                  </div>
                  <div class="dialog__footer">
                      <button class="dialogbtnner" @click="cancel()" :disabled="pending">取消</button>
                      <button class="dialogbtnner" @click="dialogbtn()" :disabled="pending">完成</button>
                  </div>
              </div>
          </transition>
			</div>
  </div>
</template>

<script>
import headerSearch from '../public/header-search.vue';
import soFooter from '../components/footer-bar';
import Checkbox from '../components/Checkbox';
import share from '../components/WebShare.vue';
import shareTopage from '../components/shareTopage';
import { MessageBox } from 'mint-ui';
  export default {
    data() {
      return {
        companyImgUrl: require('../common/images/UI-11.png'),
				path: 'http://',
				collect_vale:'收藏',
				isCollect:false,
				position: '-2.66rem', // 默认样式
				prev_ids:'',
				aaa:false,
				shareLink: '',
				checked:false,
        options: '',   //企业名称
        log_img: '',  //企业头像
        userInfo:'', //用户信息
        cp_id: '',   //企业id
        edit_flag: false,
        userId:'',
        img_flag1: true,
				img_flag2: false,
				activeShow: false, //活动编辑
				activeNoticeShow: false, //通知编辑
				drownshareShow: false, //遮罩层
				dropName:'我的同事',
				type:'2',
				classA:'main-company-index-Intro',
				isShow:false,
				notice_content:'',//企业公告内容
				descShow: false, //简介编辑
				editortext: '编辑',
				editor: '编辑',
				notice_show:true,//公告显示
				set_show:false,//设置显示
				join_show:false,//申请加入按钮显示
				shar_show:true,//分享按钮显示
				shareToShow: false,    //分享引导
				Sharing: '',    //分享参数
				shareshow: false,  //微信分享引导

				s_btn_more:false,
				com_show:true,//公司简介显示控制
				fa_show:true,//法人代表模块显示控制
				base_show:true,//基本信息显示控制
				hot_show:true,//热销模块显示控制
				qi_show:true,//抢购模块显示控制
				new_show:true,//新闻咨询模块显示控制
				hou_show:true,//活动模块显示控制
				//编辑显示控制
				com_set_show:false,//公司简介模块显示控制
				fa_set_show:false,//法人代表模块显示控制
				base_set_show:false,//基本信息显示控制
				hot_set_show:false,//热销模块显示控制
				qi_set_show:false,//抢购模块显示控制
				new_set_show:false,//新闻咨询模块显示控制
				hou_set_show:false,//活动模块显示控制
				notice_editor:false,//公告遮罩层显示控制
				add_module:false,//添加模块显示控制
				ed_show:false,
				coll_show:true,
				recoll_show:false,
				stau:1,
				cNum:0,//需要显示的总是
				xNum:0,//选择的数量
				ids:'',
				Num_show:false,
				check:'',
				Title:'产品动态',//编辑标题
				edit_show:false,
				//编辑产品 新闻 活动 列表
				edit_list:[],
				access_token:'',

				more_show:true,

				//弹出框控制
				stateShow:false,
				pending: false,
				conttent:'',
				placeholder: '请输入标签名称',
				show:false,
				tag_show:false,

				corporation: [],
        hostlist: [],
        purlist: [],
        actives: [],
        infos: [],
        infolist: [],
				tags: [],
				url:''
      };
    },
    components:{
    	headerSearch,
			soFooter,
			Checkbox,
			share,
			shareTopage
		},
    created() {
      let that = this;
			that.userInfo = JSON.parse(window.localStorage.getItem('userInfo'));
			that.access_token = window.localStorage.getItem('access_token');
			that.cp_id = that.$route.query.cp_id;
			console.log('用户',that.userInfo);
			if(that.userInfo){
				that.checkCollect();
				that.visit();
			}
			
			//获取当前企业的详细内容
			that.getCompanyInfo();
			// that.shareLink = location.href.split('#')[0].replace('&shareShow=true', '');
			that.shareLink = location.href.split('#')[0];
			console.log('链接地址',that.shareLink); 
		
			that.getLabellist(that.cp_id);
			
		  

    },
    mounted:function () {

      let that = this;
      // var user = Promise.resolve(this.getUserInfo())
      // user.then(
      //   function (result) { 
      //   that.userInfo = result;
      //   that.getCompanyInfo(result.id);
      // // })
			// that.cp_id = that.$route.query.cp_id;
			// that.getLabellist(that.cp_id);
			// that.checkCollect();
		  // that.visit();
      
    },
    methods:{
      // 点击三个点提示分享引导
      shareClick() {
          if(typeof Wechat !='undefined'){   //安卓
              console.log('进来安卓了');
              this.shareToShow = true;
          }else{
            console.log('进来浏览器')
            //浏览器
              var ua = navigator.userAgent.toLowerCase();
              //微信浏览器
              var isWeixin = ua.indexOf('micromessenger') != -1;
              // this.shareshow = true;
              //微信浏览器
              this.isShow = true;
              this.shareshow = true;
          }
          this.drownshareShow = false;
      },
      // 点击分享遮罩层关闭
      closeShare() {
          this.isShow = false;
					this.shareToShow = false;
					this.shareshow = false;
      },
      //微信群 / 好友
      MessageShareData() {
          this.shareToShow = false;
          this.Sharing = 1;
          this.isShow = true;
          console.log('分享到好友');
      },
      //微信朋友圈
      TimelineShareData() {
          this.shareToShow = false;
          this.Sharing = 0;
          this.isShow = true;
          console.log('分享到微信朋友圈');
      },
      //下拉分享、收藏
      gotobtn() {
          this.drownshareShow = !this.drownshareShow;  //打开下拉分享、收藏
      },
      // 点击空白，下拉框收起
      closeDrown() {
          this.drownshareShow = false;
      },
			 /**
			 * 分享数+1
			 */
			shareSuccess: function(){
					var ddd = {};
					ddd.user_id = this.userInfo.uid;
					ddd.module = 2;
					ddd.module_id = this.cp_id; 
					this.isShow = false;
					this.$post(this.$path + '/index.php/api/count/share', ddd).then((response) => {
							
					})
			},
			/**
			 * 访问量加1
			 */
			visit: function(){
					console.log(955);
					// var data  = this.options;
					var ddd = {};
					ddd.user_id = this.userInfo.uid;
					ddd.module = 2;
					ddd.module_id = this.cp_id; 

					this.$post(this.$path + '/index.php/api/count/visit', ddd).then((response) => {
							
							console.log(response)
					})
			},
			//点击商品查看详情
			jumpProduct(val){
				console.log(val);
				this.$router.push({
						path: '/productDetail',
						query: {id: val}
				})
			},
			//获取标签列表
			getLabellist(c_id){
				let that = this;
				that.$fetch(that.$path + '/index.php/api/c/label/'+c_id).then((response) => {
					that.tags = response.data;
					console.log('获取标签列表',response);
				})
			},
			/*更多*/
			btn_more() {
					if($(".btn_more").html() == '收起 ︿') {
							$(".about_hidden").slideUp(1000);
							$(".btn_more").html("更多 ＞");
					}else {
							$(".about_hidden").slideDown(1000);
							$(".btn_more").html("收起 ︿");
					}
			},
			contains(arr, obj) {  
					var i = arr.length;  
					while (i--) {  
							if (arr[i] === obj) {  
									return true;  
							}  
					}  
					return false;  
			},  
			//获取当前企业的详细内容
    	getCompanyInfo() {
				let that = this;
				//企业id
				let cp_id = that.$route.query.cp_id;
    		that.$fetch(that.$path + '/api.php/company/getCompanyIndexInfo',{cp_id}).then((response) => {
					console.log('企业信息',response);
					if(response.code == 200){
						if(that.userInfo){
								//登陆的判断身份
								let check_sta = that.contains(response.data.job_user,that.userInfo.uid);
								console.log('用户身份',check_sta);
							if(check_sta == true){//当前用户为管理员/成员
									if(response.data.uid == that.userInfo.uid){//当前用户是该企业的创建者
										that.edit_flag = true;
										that.dropName = '员工管理';
										that.type = '1';
										that.edit_show = true;
										that.set_show = true;
										that.join_show = false;//申请加入
										that.u_type = 1;
										that.coll_show = false;//收藏
										that.recoll_show = false;//收藏
										// $(".about_hidden").slideDown(1000);
									}else{//成员
										that.notice_editor = false;
										that.s_btn_more = true;
										that.set_show = true;
										that.edit_show = false;
										that.join_show = false;//申请加入
										that.u_type = 2;
										$(".about_hidden").slideUp(1000);
								}
							}else{//当前用户为游客
									that.s_btn_more = true;
									that.set_show = false;//设置
									that.join_show = true;//申请加入
									that.edit_show = false;//编辑
									that.u_type = 3;
									$(".about_hidden").slideUp(1000);
							}
						}else{//未登陆的游客
								that.s_btn_more = true;
								that.set_show = false;//设置
								that.join_show = true;//申请加入
								that.edit_show = false;//编辑
								that.coll_show = false;//收藏
								that.u_type = 3;
								$(".about_hidden").slideUp(1000);
						}
						
							
							//热销产品
							that.hostlist = response.data.pro_hot;
							//抢购产品
							that.purlist =  response.data.pro_panic;
							//新闻列表
							that.infolist = response.data.news;
							//活动列表
							that.actives = response.data.activity;
							// console.log(that.hostlist);
							//企业通知
							that.notice_content = response.data.c_content;
							//遍历模块
							response.data.module.forEach(element => {
								switch(element.module){
									case 1 :
										if(element.status == 1){
											that.com_show=true//公司简介显示控制
										}else{
											that.com_show=false//公司简介显示控制
										}
									break;
									case 2 :
										if(element.status == 1){
											that.fa_show=true//法人代表模块显示控制
										}else{
											that.fa_show=false//公司简介显示控制
										}
									break;
									case 3 :
										if(element.status == 1){
											that.base_show=true//基本信息显示控制
										}else{
											that.base_show=false//公司简介显示控制
										}
									break;
									case 4 :
										if(element.status == 1){
											that.hot_show=true//热销模块显示控制
										}else{
											that.hot_show=false//公司简介显示控制
										}
									break;
									case 5 :
										if(element.status == 1){
											that.qi_show=true//抢购模块显示控制
										}else{
											that.qi_show=false//公司简介显示控制
										}
									break;
									case 6 :
										if(element.status == 1){
											that.hou_show=true//活动模块显示控制
										}else{
											that.hou_show=false//公司简介显示控制
										}
									break;
									case 7 :
										if(element.status == 1){
											that.new_show=true//新闻咨询模块显示控制
										}else{
											that.new_show=false//公司简介显示控制
										}
									break;
									case 8 :
										if(element.status == 1){
											that.notice_show=true//企业通知模块显示控制
											that.classA = 'main-company-index-Intro';
										}else{
											that.notice_show=false//企业通知显示控制
											that.classA = 'main-company-index-Intro notice-n';
										}
									break;
									
								}
							});
							that.options = response.data;
							// console.log('域名显示',that.options.c_website);
							// let dd = that.options.c_website.indexOf("http://")
							//判断域名中是否有http  没有则加上http
							that.options.c_website = that.options.c_website ? that.options.c_website : '';
							if(that.options.c_website.indexOf("http://") == -1 ){
								if(that.options.c_website.indexOf("https://") == -1 ){
									that.url = 'http://'+that.options.c_website
								}else {
									that.url = 'https://'+that.options.c_website
								}		
							}
							else{
									that.url = that.options.c_website;
							}
							// if(response.data.c_status == 2){
							// 	that.notice_show = false;
							// 	that.classA = 'main-company-index-Intro notice-n';
							// }
							if(response.data.log_img){
									that.log_img = that.$path+response.data.log_img
							}else{
									that.img_flag1 = false
									that.img_flag2 = true
							}
					}else{//游客身份

					}
					
	      })
			},
      //点击更多
   		JumpCircleList(event) {
	      	this.$router.push({path: '/home/CircleList', query: {paicheNo: event}}); 
      },
      //点击产品详情
      productDetailClick() {
        this.$router.push({path: '/productDetail'});
      },
      //点击新闻详情
      newsdetailClick(val) {
        this.$router.push({ path: '/newsDetail',query: {id: val}});
      },
      //点击活动详情
      activitydetailClick(val) {
        this.$router.push({ path: '/activityDetail',query: {id: val}});
			},
			//点击他的圈子跳转
			jumpCi (){
				this.$router.push({ path: '/userCircle'});
			},
			//点击企业官网跳转
			jumpCp (){
				let that = this;
				let options = that.options;
				if(options.c_website == '' || options.c_website == null) {
					MessageBox.alert('请您先填写官网哦').then(action => {
							that.$router.push({ path: '/userCenter/companyData',query: {cpId: that.cp_id,u_type:that.u_type}});
					});
				}else {
					if(options.c_website.indexOf("http://") == -1 ){
						if(options.c_website.indexOf("https://") == -1 ){
							window.location.href = 'http://'+options.c_website;
						}else {
							window.location.href = 'https://'+options.c_website;
						}		
					}else {
						window.location.href = options.c_website;
						}
				}
			},
			//点击对话交流跳转
			jumpMe (){
				// this.$router.push({ path: 'http://www.baidu.com'});
			},
			//点击产品列表跳转
			jumpPro (){
				this.$router.push({ path: '/companyProductList',query: {cpId: this.cp_id}});
			},
			//点击优惠活动跳转
			jumpAct (){
				// this.$router.push({ path: '/companyActivityList',query: {cpId: this.cp_id}});
				this.$router.push({path:'/companyNewsList', query: {cpId: this.cp_id}});
			},
			//点击编辑公司简介可编辑
			editordesc(stau) {
				let that = this;
				if(stau == 1){//点击编辑
						that.editortext = '保存';
						that.stau =2;
						that.tag_show = true;
				}else{//点击保存
				//更新公司简介
					let cpId = that.cp_id;
					let myboxs= that.$refs.myboxs;
					let aa = [];
					for(let i =0 ;i<myboxs.length;i++){
							aa[i] = myboxs[i].innerHTML+'||'+myboxs[i].id;
					}
					let mybox = that.$refs.mybox.innerHTML; 
					let desc = mybox;
					console.log(aa.join("-"));
					that.$fetch(that.$path + '/api.php/company/editorCompanyDescription',{cpId:cpId,desc:desc,tag:aa}).then((response) => {
					console.log('企业信息001',response);return false;
					if(response.code == 200){
						that.notice_show = false;
						that.classA = 'main-company-index-Intro notice-n';
					}
				
	      	})
					that.editortext = '编辑';
					that.stau =1;
					that.tag_show = false;
				}
				
				// if(that.editortext = '编辑') {
				// 	that.editortext = '保存';
				// }else {
				// 	that.editortext = '编辑';
				// }
				this.descShow = !this.descShow;
			},
			//点击选择需要显示的内容
			singChange(){
				let n = 0;
				let ids = '';
				this.edit_list.forEach(el => {
				if(el.checked) {
					n+=1;
					ids += el.id + ',';
				}

        })
                var ids_arr = ids.split(',');
                ids_arr.pop();
                console.log(ids_arr)
                this.xNum = n;
                this.ids = ids;
                if(ids_arr.length > this.cNum){
                    this.$openTips({
                        text: '最多选择'+this.cNum+'个',
                        time: 2000
                    })
                    // 对比出新增了那个id
                    for (let i = 0; i < ids_arr.length; i++) {
                        var reg = new RegExp('(?:^|,)' + ids_arr[i] + ',');
                        if(!this.prev_ids.match(reg)){
                            this.$refs['edit_id' + ids_arr[i]][0].checked = false;
                        }
                    }
                    return false;
                }
                this.prev_ids = ids;
                console.log(ids) 
		
			},

			// singChange(){
			// 	let n = 0;
			// 	let ids = '';
			// 	this.edit_list.forEach((el,index,arr) => {
				
			// 		if(el.checked){
			// 			n+=1;
			// 			// this.edit_list[index].check = false;
			// 			// console.log(this.edit_list[index].name);
			// 		}
			// 		console.log('数量',n);
			// 		if(n>=3){
			// 			el.check = true;
			// 		}
					
			// 		console.log('0000',el);
			// 		// if(n >= 3){
			// 		// 	el.check = true;
			// 		// 	// if(el.checked){
			// 		// 	// 	console.log(9);
			// 		// 	// 	this.edit_list[index].check = false;
			// 		// 	// }else{
			// 		// 	// 	console.log(98);
			// 		// 	// 	el.check = true;
			// 		// 	// }
			// 		// 	// console.log('100',this.edit_list);
			// 		// }else{
			// 		// 	// this.edit_list[index].check = false;
			// 		// }
					
			// 		// if(el.checked) {
			// 		// 	console.log('我是选中的'+el);
			// 		// 	n+=1;
			// 		// 	if(n == 3) {
			// 		// 		this.aaa = true;
							
			// 		// 		// return;
			// 		// 	}else{
			// 		// 		this.aaa = false;
			// 		// 	}
			// 		// }
					
					
			// 		// console.log('元素',this.edit_list)
			// 	})



			// 	// this.edit_list.forEach(el => {
			// 	// 	// if(edit_list.length < 4) {
			// 	// 	// 	console.log('不能选择了');
			// 	// 	// }
			// 	// if(el.checked) {
			// 	// 	if(n==0){
			// 	// 		ids += el.id;
			// 	// 	}else{
			// 	// 		ids += ','+el.id;
			// 	// 	}
			// 	// 	n+=1;
			// 	// 	return;
			// 	// }
			// 	// 	console.log(n);
			// 	// 	if(n > this.cNum){
			// 	// 		el.checked = false;
			// 	// 		console.log('不能选择了');
			// 	// 		return false;
			// 	// 	}
			// 	// })
			// 	// this.xNum = n;
			// 	// if(n > this.cNum){
			// 	// 		console.log('不能选择了');
			// 	// }
			// 	// this.ids = ids;
			// 	// let bb = 0;
			// 	// if(ids != ''){
			// 	// 	let aa = ids.split(',');
			// 	// 	bb = aa.length;
			// 	// }
				
			// 	// console.log(n);
			// 	// console.log(bb);
			// },
			//下拉添加圈聊、添加好友
      // dropDown() {
      //   this.dropintopShow = !this.dropintopShow;
			// },
      // 点击空白，下拉框收起
      // closeDrown() {
      //   this.dropintopShow = false;
      // },
			//点击员工管理
			teamManage(){
					this.$router.push({ path: '/userCenter/companyColleague',query: {cp_id: this.cp_id}});
			},
			//活动编辑
			cancel() {
				console.log(545454);
				this.activeShow = false;
			},
			//点击编辑企业通知
			editorNotice(){
				this.activeNoticeShow = true;
			},
			//编辑企业通知
			finishNotice(){
				let that = this;
				that.$fetch(that.$path + '/api.php/company/editorCompanyNotice',{n_id:that.options.c_id,content:that.notice_content}).then((response) => {
					console.log('编辑结果',response);
					if(response.code == 200){
						this.activeNoticeShow = false;
						that.getCompanyInfo();
						
					}
	      })
			},
			//通知编辑
			cancelNotice() {
				this.activeNoticeShow = false;
			},
			//点击完成
			finish(val) {
				let that = this;
				let ids = that.ids;
				let c_id= that.cp_id;
				let u_type = 1;//企业还是圈子更新  1企业更新 2圈子更新
				
				if(val == 'product_hot'){
					let type = 1;
						//请求接口修改产品热销状态
						that.$fetch(that.$path + '/index.php/api/updateProducstatus/'+c_id+'/'+ids+'/'+u_type+'/'+type).then((response) => {
								if(response.code == 200) {
										that.getCompanyInfo();
								}
						})
				}else if(val == 'product_panic'){
					let type =2;
					//请求接口修改产品抢购状态
						that.$fetch(that.$path + '/index.php/api/updateProducstatus/'+c_id+'/'+ids+'/'+u_type+'/'+type).then((response) => {
								if(response.code == 200) {
										that.getCompanyInfo();
								}
						})
				}else if(val == 'news'){
					let type =2;
					//请求接口修改新闻状态
						that.$fetch(that.$path + '/index.php/api/updateNewsstatus/'+c_id+'/'+ids+'/'+u_type).then((response) => {
								if(response.code == 200) {
										that.getCompanyInfo();
								}
						})
				}else if(val == 'activity'){
					let type =2;
					//请求接口修改活动状态
						that.$fetch(that.$path + '/api.php/Activity/updateActivitystatus',{ids,c_id,u_type}).then((response) => {
								if(response.code == 200) {
										that.getCompanyInfo();
								}
						})
				}else if(val == 'module'){
					let status =1;
					//请求接口修改模块状态
						that.$fetch(that.$path + '/api.php/Company/updateCompanyModule',{c_id,ids,status}).then((response) => {
								if(response.code == 200) {
										that.getCompanyInfo();
								}
						})
				}
				
				this.activeShow = false;

			},
			//点击编辑
			activeditorClick(val) {
				let that = this;
				let c_id = that.cp_id;
				if(val == 'product_hot'){//获取当前企业热销产品
					that.Num_show = true;
					that.cNum = 3;
					that.Title='热销产品';
					that.$fetch(that.$path + '/index.php/api/ProductList', {c_id}).then((response) => {
							console.log('产品列表', response);
							that.edit_list = [];
							if(response.code == 200) {
									let list = response.data;
									
									list.forEach((element,index) => {
										// console.log(element);
										that.edit_list.splice(0,0,{id:element.IDProduct,name:element.chrName,img:element.smallImg,date_time:element.dtCreate,Num:element.NumS,check:false});
										that.check = val;
									});
									console.log('pro',that.edit_list);
							}
					})
				}else if(val == 'product_panic'){//编辑当前企业抢购产品
					that.Num_show = true;
					that.cNum = 4;
					that.Title='抢购产品';
					
					that.$fetch(that.$path + '/index.php/api/ProductList', {c_id}).then((response) => {
							console.log('产品列表2', response);
							that.edit_list = [];
							if(response.code == 200) {
									let list = response.data;
									
									list.forEach((element,index) => {
										// console.log(element);
										that.edit_list.splice(0,0,{id:element.IDProduct,name:element.chrName,img:element.smallImg,date_time:element.dtCreate,Num:element.NumS});
										that.check = val;
									});
									console.log(that.edit_list);
							}
					})
				}else if(val == 'news'){//编辑当前企业新闻咨询
					that.Num_show = false;
					that.cNum = 4;
					that.Title='新闻咨询';
					
					that.$fetch(that.$path + '/index.php/api/NewsList', {c_id}).then((response) => {
							console.log('新闻列表', response);
							that.edit_list = [];
							if(response.code == 200) {
									let list = response.data;
									
									list.forEach((element,index) => {
										// console.log(element);
										that.edit_list.splice(0,0,{id:element.IDNews,name:element.Title,img:element.img,date_time:element.dtCreate});
										that.check = val;
									});
									console.log(that.edit_list);
							}
					})
				}else if(val == 'activity'){//编辑当前企业的活动
					that.Num_show = false;
					that.cNum = 4;
					that.Title='活动动态';
					
					that.$fetch(that.$path + '/api.php/Activity/getActivityList', {c_id}).then((response) => {
							console.log('活动列表', response);
							that.edit_list = [];
							if(response.code == 200) {
									let list = response.data;
									
									list.forEach((element,index) => {
										// console.log(element);
										that.edit_list.splice(0,0,{id:element.id,name:element.title,img:element.img,date_time:element.begin_time});
										that.check = val;
									});
									console.log(that.edit_list);
							}
					})
				}else if(val == 'module'){//添加模块
					that.Num_show = false;
					that.cNum = 4;
					let status = 1;
					that.Title='添加模块';
					that.ed_show=false;
					that.$fetch(that.$path + '/api.php/Company/getCompnayModuleList', {c_id}).then((response) => {
							console.log('活动列表', response);
							that.edit_list = [];
							if(response.code == 200) {
									let list = response.data;
									
									list.forEach((element,index) => {
										// console.log(element);
										that.edit_list.splice(0,0,{id:element.id,name:element.name});
										that.check = val;
									});
									console.log(that.edit_list);
							}
					})
				}
				this.activeShow = true;
			},
			
			//点击设置进入企业管理
			teamCompanyData(){
				this.$router.push({ path: '/userCenter/companyData',query: {cpId: this.cp_id,u_type:this.u_type}});
			},
			//点击编辑当前企业相关信息
			editCompany(){
				this.com_set_show=true//公司简介模块显示控制
				this.fa_set_show=true//法人代表模块显示控制
				this.base_set_show=true//基本信息显示控制
				this.hot_set_show=true//热销模块显示控制
				this.qi_set_show=true//抢购模块显示控制
				this.new_set_show=true//新闻咨询模块显示控制
				this.hou_set_show=true//活动模块显示控制
				this.notice_editor=true//公告遮罩层显示控制
				this.add_module=true//添加模块显示控制
				this.more_show = false;
				//关闭下拉框
				this.dropintopShow = false;
			},
			//删除模块
			deleteCom(type){
				console.log(type);
				let that = this;
				let cpId = that.options.cp_id;
				let status = 2;
				that.$fetch(that.$path + '/api.php/company/deleteCompanyModule',{cpId:cpId,status:status,module:type}).then((response) => {
					console.log('删除结果',response);
					if(response.code == 200){
							switch(type){
									case 1 :
									that.com_show=false//公司简介显示控制
									break;
									case 2 :
										that.fa_show=false//法人代表模块显示控制
									break;
									case 3 :
										that.base_show=false//基本信息显示控制
									break;
									case 4 :
										that.hot_show=false//热销模块显示控制
									break;
									case 5 :
										that.qi_show=false//抢购模块显示控制
									break;
									case 6 :
										that.hou_show=false//活动模块显示控制
									break;
									case 7 :
										that.new_show=false//新闻咨询模块显示控制
									break;
									case 8 :
										that.notice_show=false//新闻咨询模块显示控制
										that.classA = 'main-company-index-Intro notice-n';
									break;
							}
					}
				
	      })
				
			},
			//添加模块
			addModule(){

			},
			// 点击三个点提示分享引导
			// gotobtn() {
			// 	this.shareShow = !this.shareShow;
			// 	this.dropintopShow = false;
			// 	this.ISshow = true;
			// },
			//点击加入企业
			joinCompany(){
				let that = this;
				let access_token = window.localStorage.getItem('access_token');
				let timer = window.localStorage.getItem('timer');
				if(!access_token || !timer) {
					this.$router.push({path: '/login'}); 
				}
				var companyName = that.options.name;
        var userName = that.userInfo.username;
        // var cp_id = this.userJob
        // var applyInfo = this.applyInfo
        var userId = that.userInfo.uid;
        var cp_id = that.cp_id;
				this.$router.push({path:'/inCompanyTwo', query: {companyName, userId, userName, access_token,cp_id}});
			},
			/**
			 * 分享开关
			 */
			showFunc() {
				if (this.position == '-2.66rem') {
					this.position = '-0.55rem';
				} else {
					this.position = '-2.66rem'
				}
			},
			//收藏
			 addCollect: function(){
					var that = this;
					if(this.userInfo.uid == 0 || this.access_token == ''){
							this.$openTips({
									text: '请先登陆',
									time: 2000
							}) 
							this.$router.push({
									path: '/login',
							})
					}else{
							var coll = {};
							coll.module = 2;
							coll.module_id = that.cp_id;
							coll.user_id = that.userInfo.uid;

							this.$post(this.$path + '/index.php/api/collection/addCollection', coll).then((response) => {
									if(response.code == 200){
										that.recoll_show = true;
										that.coll_show = false;
										that.dropintopShow = false;
											that.$openTips({
													text: response.msg,
													time: 2000
											})
											that.isCollect = true;
									}
							})
					}
			},
			//已收藏
			removeCollect: function(){
				var that = this;
				if(this.userInfo.uid == 0 || this.access_token == ''){
						this.$openTips({
								text: '请先登陆',
								time: 2000
						}) 
						this.$router.push({
								path: '/login',
						})
				}else{
							var coll = {};
							coll.module = 2;
							coll.module_id = that.cp_id;
							coll.user_id = that.userInfo.uid;
						this.$post(this.$path + '/index.php/api/collection/removeCollection', coll).then((response) => {
								if(response.code == 200){
									that.recoll_show = false;
										that.coll_show = true;
										that.dropintopShow = false;
										that.$openTips({
												text: response.msg,
												time: 2000
										})
										that.isCollect = false;
								}
						})
				}
			},
			//检测当前企业是否已收藏
				checkCollect: function(){
						var that = this;
						console.log(that.access_token);
						if(!that.userInfo.uid == 0 && !that.access_token == ''){
							console.log('check')
							var coll = {};
							coll.module = 2;
							coll.module_id = that.cp_id;
							coll.user_id = that.userInfo.uid;
							console.log(coll);
								this.$post(this.$path + '/index.php/api/collection/checkCollection', coll).then((response) => {
										console.log(858,response);
										if(response.code == 200){
											if(response.data == false){
												console.log(999);
												that.recoll_show = false;
												that.coll_show = true;
											}else{
												console.log(888);
												that.recoll_show = true;
												that.coll_show = false;
											}
											
												that.isCollect = response.data;
										}
								})
						}
				},

				 //点击删除标签
					delClick(val){

							let that = this;
							that.$fetch(that.$path + '/index.php/api/company/deletelabel/'+val).then((response) => {
							console.log('删除标签',response);
							that.$openTips({
											text: '删除成功',
											time: 1000
									})
									this.getLabellist(this.cp_id);
							})
					},

					 //点击添加标签显示弹出框
            tagShow(){
                console.log(56);
                this.show = true;
                this.stateShow = true;
            },
            // 关闭弹框
            afterLeave() {
            	this.stateShow = false;
            },
            close() {
            	this.show = false;
            },

            // 关闭弹框
            // cancel() {
            // this.show = false;
            // },
            // 确定提交弹框内容
            dialogbtn() {
            let that = this;
            that.$post(that.$path + '/index.php/api/company/label',{c_id:that.cp_id,label_name:that.conttent,access_token:that.access_token}).then((response) => {
                    console.log('添加标签',response);
                    if(response.code == 200){
                        this.stateShow = false;
                        this.show = false;
                        that.$openTips({
                            text: '添加成功',
                            time: 1000
                        })
                        this.getLabellist(that.cp_id);
                    }
				    })
						},
						
						//点击更多
						clickMore(val){
							let cpId = this.cp_id;
								switch(val){
									case 'hot':
									case 'panic':
										this.$router.push({path:'/companyProductList', query: {cpId}});
									break;
									case 'act':
										this.$router.push({path:'/companyActivityList', query: {cpId}});
									break;
									case 'news':
										this.$router.push({path:'/companyNewsList', query: {cpId}});
									break;
								}
								console.log(val);
						},

    }
  }

</script>
<style >
@import '../common/css/userCenter.css';
.notice-n{
	margin-top: 0.8rem;
}
/* 下拉框 */
.drop_intop_panel {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 16;
}
.dropDownpanel {
    width: auto;
    height: auto;
    background-color: #fff;
    position: absolute;
    top: 0.88rem;
    right: 0.12rem;
    z-index: 15;
    border-radius: 4px;
    box-shadow: 2px 2px 5px rgba(211, 125, 125, 0.34);
}
.dropDownpanel .dropdown_triangle {
    width: 0;
    height: 0;
    border-right: 8px solid transparent;
    border-left: 8px solid transparent;
    border-bottom: 8px solid #fff;
    position: absolute;
    right: 0.13rem;
    top: -0.14rem;
    z-index: 15;
}
.dropDownpanel a {
    font-size: 0.3rem;
    color: #333;
    display: block;
    line-height: 0.92rem;
    height: 0.92rem;
		text-align: left;
		padding: 0 0.2rem;
}
.dropDownpanel a .icon-icon,
.dropDownpanel a .icon-bianji1,
.dropDownpanel a .icon-fenxiang4,
.dropDownpanel a .icon-shoucang2,
.dropDownpanel a .icon-jiaru,
.dropDownpanel a .icon-shezhi1 {
  font-size: 0.36rem;
	margin-right: 0.2rem;
	color: #333;
}

/* 头部企业名称 */
.main-company-index .mint-header-title {
		width: 1.96rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
/* 头部浮层区 */
.suspension-top img {
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	/* margin-bottom: -0.2rem; */
}
.suspension-top .main_index_desc {
	font-size: 0.34rem;
	color: #fff;
	width: 3.96rem;
	margin: 0 auto;
	text-align: center;
	white-space: nowrap;
	text-overflow: ellipsis;
	-o-text-overflow: ellipsis;
	overflow: hidden;
}
.main-company-index .coterie ul>li {
	margin-right: 0.48rem;
}

/* 通知内容区 */
.main-notice {
	height: 0.6rem;
	width: 100%;
	background-color: #fff;
	display: flex;
	justify-content: flex-start;
	line-height: 0.6rem;
	padding: 0 0.2rem;
	margin-bottom: 0.2rem;
}
.main-notice span {
	font-size: 0.34rem;
	color: #e50838;
	font-weight: bold;
	display: inline-block;
	width: 1.4rem;
	margin-left: -0.1rem;
}
.main-notice marquee {
	font-size: 0.28rem;
	color: #333;
	line-height: 0.66rem;
}
.main-notice .notice_editor {
    position: absolute;
    width: 95%;
    height: 0.6rem;
    background-color: rgb(0,0,0,0.4);
    left: 0.2rem;
}
.main-notice small {
		float: right;
    height: 0.6rem;
    margin-top: -0.2rem;
		padding-right: 0.14rem;
		color: #fff;
}
.option_description .icon-shanjian {
    position: absolute;
    left: -.1rem;
		top: -0.3rem;
		color: #e50838;
}
/* 公司简介内容 */
.main-company-index-Intro {
	background-color: #fff;
}
.main-company-index-Intro p {
	font-size: 0.28rem;
	color: #333;
	text-align: left;
	padding: 0.2rem 0.76rem 0.3rem 0.2rem;
}
.main-company-index-description {
	padding-bottom: 0.2rem;
}
.main-company-index-description .option_description {
	display: flex;
	justify-content: flex-start;
	padding: 0 0.2rem;
}
.main-company-index-description .option_description img{
	width: 0.7rem;
	height: 0.7rem;
	margin-right: 0.4rem;
}
.main-company-index-description .option_description h3 {
	font-size: 0.34rem;
	color: #333;
	line-height: 0.36rem;
}
.main-company-index-description .option_description p {
	font-size: 0.18rem;
	color: #999;
	padding: 0;
	line-height: 0.46rem;
}
.main-company-index-description .company_description_descShow {
		border: 1px dashed #d8d8d8;
		line-height: 0.42rem;
		max-height: 1.2rem;
    margin: 0 .2rem;
		padding: 0.1rem;
		white-space: nowrap;
		text-overflow: ellipsis;
		-o-text-overflow: ellipsis;
		overflow: hidden;
		max-width: 7rem;
		/* overflow: hidden;
		text-overflow: ellipsis;
		-o-text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; */
}
.option_tagNames {
    margin: 0;
    padding: 0 .2rem;
    box-sizing: border-box;
    overflow: hidden;
    /* margin-top: 0.1rem; */
}
.option_tagNames span {
		font-size: .28rem;
    background-color: #999;
    color: #fff;
    /* padding: .1rem; */
    float: left;
    margin-right: .2rem;
    box-sizing: border-box;
		margin-top: 0.14rem;
		margin-bottom: 0.04rem;
		min-width: 1.4rem;
		line-height: 0.46rem;
}
.option_tagNames .insertag {
		font-size: .28rem;
    background-color: #fff;
    color: #999;
    /* padding: 0.09rem; */
    float: left;
    margin-right: .2rem;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin-top: 0.14rem;
    margin-bottom: 0.04rem;
		border: 1px dashed #d8d8d8;
		height: auto;;
}
/* 分享按钮 */
.view_card_share {
    position: fixed;
    height: 2rem;
    width: 3rem;
    font-size: 0.26rem;
    display: flex;
    top: 50%;
    margin-top: -1.5rem;
}
.view_card_share .share_hide_btn {
    width: .8rem;
    height: .6rem;
    border-radius: 50% 0 0 50%;
    border-left: 1px solid #999;
    text-align: left;
    background-color: #fff;
    line-height: 0.6rem;
    top: 54%;
    position: absolute;
    z-index: 100;
    color: #e50838;
}
.share_hide_collection {
    margin-left: .6rem;
    color: #333;
    position: absolute;
    top: 36% !important;
    z-index: 100;
}
.share_hide_collection .hide_collection {
    margin: .08rem 0;
    border: 1px solid #ccc;
    background-color: #fff;
    line-height: .3rem;
    border-radius: .28rem;
    padding: 0.1rem 0.4rem;
}
.share_hide_collection .hide_collection .icon-shoucang {
  color: #e50838;
  margin-right: 0.12rem;
}
.share_hide_collection .hide_collection .icon-fenxiang2 {
  color: #FF9938;
  margin-right: 0.12rem;
}
/* 分享引导 */
/* .Share_guidance {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url('../common/images/share.png') no-repeat;
    background-size: cover;
    z-index: 100;
    opacity: 0.8;
} */
/* 查看更多企业信息 */ 
.btn_more {
		font-size: 0.26rem;
    color: #e50838 !important;
    display: block;
    padding-bottom: 0.2rem;
    background-color: #fff;
    margin-top: -0.2rem;
    padding-top: 0.2rem;
}
/* 法人 */
.main-company-index-corpor {
	margin-top: 0.2rem;
	padding: 0.5rem 0.4rem 0;
	box-sizing: border-box;
	overflow: hidden;
	background-color: #fff;
}
.main-company-index-corpor label {
	font-size: 0.28rem;
	color: #999;
	display: block;
	line-height: 0.48rem;
}
.main-company-index-corpor strong {
	font-size: 0.34rem;
	color: #333;
	display: block;
	font-weight: 400;
	line-height: 0.48rem;
}
.main-company-index-corpor .corpor-list {
	padding-bottom: .6rem;
	float: left;
	width: 3.18rem;
	box-sizing: border-box;
	text-align: left;
}
.main-company-index-corpor .corpor-list:last-child strong{
	font-size: 0.28rem;
	line-height: 0.36rem;
}
/* 基本信息 */
.main-essential_info {
	background-color: #fff;
	margin-top: 0.2rem;
	padding-bottom: 0.26rem;
}
.main-essential_info .big_square ul>li img {
	width: auto;
	height: auto;
	margin: auto;
	display: block;
	margin-bottom: 0.2rem;
}
/* 企业热销 */
.main-company-index_product {
	background-color: #fff;
	/* margin: 0 !important; */
	margin-top: 0.2rem;
}

/* 编辑动态弹框 */
.Editorial_dynamics .intop {
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	position: fixed;
	top: 0;
	left: 0;
	z-index: 20;
}
.Editorial_dynamics .editorial_list {
	background-color: #fff;
	border-radius: 4px;
	width: 7rem;
	height: 6.7rem;
	overflow: hidden;
	position: absolute;
	z-index: 20;
	left: 50%;
	margin-left: -3.5rem;
	top: 50%;
	margin-top: -3.35rem;
}
.editorial_list .editorial_title {
	display: flex;
	justify-content: space-between;
	font-size: 0.28rem;
	color: #333;
	border-bottom: 1px solid #d8d8d8;
	line-height: 0.46rem;
	margin-top: 0.12rem;
	padding-bottom: 0.12rem;
}
.editorial_title button {
	border: 0;
	background-color: transparent;
	color: #999;
	font-size: 0.28rem;
	margin: 0 0.2rem;
}
.editorial_title button:last-child {
	background-color: #e50838;
	color: #fff;
	width: 1.14rem;
	border-radius: 4px;
}
.editorial_title h3 {
	font-weight: normal;
}
.editorial_list .editorial_excl {

}
.editorial_excl .editorial_item {
	padding: 0.2rem;
	border-bottom: 1px solid #d8d8d8;
}
.editorial_item img {
	width: 1rem;
	height: 1rem;
}
.editorial_item .editorial_item_title {
		line-height: 0.38rem;
    margin: 0.12rem;
		margin-left: 0.2rem;
}
.editorial_item .editorial_item_title p {
	font-size: 0.28rem;
	color: #333;
	text-align: left;
	display: block;
	width: 4.6rem;
}
.editorial_item .editorial_item_title p:first-child {
	width: 2rem;
	white-space: nowrap;
	text-overflow: ellipsis;
	-o-text-overflow: ellipsis;
	overflow: hidden;
}
.editorial_item .editorial_item_title p em {
	font-style: normal;
	color: #e50838;
}
.editorial_item .editorial_change {
		position: absolute;
    width: 100%;
    right: 0;
    text-align: right;
    top: 0;
}

/***热销榜单****/

.host_item small {
  width: 2.24rem;
	height: 2.24rem;
	text-align: center;
	vertical-align: middle;
	display: inline-block;
	margin-bottom: 0.1rem;
}
.host_item small img {
	width: 2.2rem;
	height: 2.2rem;
	max-width: 100%;
	max-height: 100%;
}


/* 热销产品为空 */
.host_item .emptyProduct {
  padding: 0 0 0.2rem;
  box-sizing: border-box;
}
.host_item .emptyProduct img {
  width: 1.56rem;
  height: 1.22rem;
  margin: 0 auto;
}
.host_item .emptyProduct p {
  font-size: 0.26rem;
  color: #999;
  text-align: center;
}

/* 限时抢购 */
.purchase_list .purchase_img {
  width: 3.45rem;
  height: 3.45rem;
}
.purchase_list .purchase_img img {
  width: 100% !important;
  height: 3.45rem;
}


/* 限时抢购产品为空 */
.purchase .emptyProduct {
  padding: 0 0 0.2rem;
  box-sizing: border-box;
}
.purchase .emptyProduct img {
  width: 1.56rem;
  height: 1.22rem;
  margin: 0 auto;
}
.purchase .emptyProduct p {
  font-size: 0.26rem;
  color: #999;
  text-align: center;
}

/* 活动为空 */
.active_item .emptyProduct {
  padding: 0 0 0.2rem;
  box-sizing: border-box;
}
.active_item .emptyProduct img {
  width: 1.56rem;
  height: 1.22rem;
  margin: 0 auto;
}
.active_item .emptyProduct p {
  font-size: 0.26rem;
  color: #999;
  text-align: center;
}

/* 新闻为空 */
.info_list .emptyProduct {
  padding: 0 0 0.2rem;
  box-sizing: border-box;
}
.info_list .emptyProduct img {
  width: 1.56rem;
  height: 1.22rem;
  margin: 0 auto;
}
.info_list .emptyProduct p {
  font-size: 0.26rem;
  color: #999;
  text-align: center;
}


/* 添加模块 */
.mycard_insert {
    height: 1.5rem;
    width: 7rem;
    border: 1px dashed #d8d8d8;
    text-align: center;
    margin: 0 auto;
    margin: 0.4rem auto;
}
.mycard_insert .icon-icon02 {
    font-size: 0.48rem;
}
.mycard_insert span {
    font-size: 0.4rem;
    color: #999;
}
/* 新闻右边详情 */
.info_list .info_time span:first-child {
    width: 2rem;
    white-space: nowrap;
    text-overflow: ellipsis;
    -o-text-overflow: ellipsis;
    overflow: hidden;
}


</style>
<style lang="scss" scoped>
//添加同级和下级弹框
.dialog {
  width: 6rem;
  border-radius: 4px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0);
  background-color: #fff;
  font-size: 0.32rem;
  z-index: 10;
  &__wrap {
  }
  &__background {
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10;
  }
  &__head {
    padding: 0.2rem 0.3rem;
    line-height: 1;
    &__title {
      line-height: 1;
      font-size: 0.28rem;
      color: #333;
    }
    &__btn {
      line-height: 1;
      float: right;
      font-size: 0.28rem;
      color: #999;
      // -webkit-text-stroke-width: 0.02rem;   //加粗字体图标
    }
  }
  &__body {
    padding: 0.1rem 0;
    color: #666;
    font-size: 0.28rem;
    white-space: normal;
    word-break: break-all;
    span {
      display: block;
      font-size: 0.24rem;
      color: #333;
      height: 0.66rem;
      line-height: 0.66rem;
      label {
        height: 0.66rem;
        line-height: 0.66rem;
        display: inline-block;
      }
      input {
          padding: 0 0.04rem;
          border: 0;
          outline: none;
          height: 0.66rem;
          line-height: 0.66rem;
          border-bottom: 1px solid #d8d8d8;
      }
    }
  }
  &__footer {
	font-size: 0;
  line-height: 1;
  padding: 0.2rem 0;
    .dialogbtnner {
		    font-size: .22rem;
        background-color: #e50838;
        border-top: 1px solid #e50838;
        width: 1rem;
        padding: .08rem 0;
        color: #fff;
        border-radius: 4px;
        margin: 0 0.1rem;
    }
    .dialogbtnner:first-child {
      background-color: #fff;
      color: #e50838;
      border: 1px solid #e50838;
    }
  }
}
.background-fade {
  &-enter {
    opacity: 0;
  }
  &-enter-active {
    transition: opacity 0.2s;
  }
  &-enter-top {
    opacity: 1;
  }
  &-leave {
    opacity: 1;
  }
  &-leave-active {
    transition: opacity 0.2s;
    opacity: 0;
  }
}
.fade-move {
  &-enter {
    opacity: 0.6;
    top: 45%;
  }
  &-enter-active {
    transition: top 0.4s ease-in-out, opacity 0.4s ease-in-out;
  }
  &-enter-to {
    opacity: 1;
    top: 50%;
  }
  &-leave {
  }
  &-leave-active {
  }
  &-leave-to {
  }
}

</style>